package com.uml.composition;

public class Computer {
    private Mouse mouse = new Mouse(); //鼠标不可以和computer分离，一荣俱荣一损俱损
    private Monitor monitor = new Monitor(); //显示器不可以和Computer分离，一荣俱荣一损俱损
    public void setMouse(Mouse mouse){
        this.mouse = mouse;
    }

    public void setMonitor(Monitor monitor) {
        this.monitor = monitor;
    }
}
